home *** CD-ROM | disk | FTP | other *** search
/ CD BIT 75 / CD BIT 75.iso / Software / ooo / f_0020 / sbasic.jar / text / sbasic / common / 03120403.xml < prev    next >
Encoding:
Extensible Markup Language  |  2003-08-01  |  4.3 KB  |  47 lines

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <html><head><title>StrComp Function [Runtime]</title><meta name="filename" content="text/sbasic/common/03120403"/><help:css-file-link xmlns:help="http://openoffice.org/2000/help"/><!--The CSS style header method for setting styles--><style type="text/css">
  3.  
  4.         p.P1{
  5.                 }
  6.         p.P2{
  7.                 }
  8.         span.T1{
  9.                 font-weight:bold;}
  10.         </style></head><body>
  11.   
  12.   
  13.   <help:paragraphinfo state="E" xmlns:help="http://openoffice.org/2000/help"/><help:to-be-embedded Eid="strcomp" xmlns:help="http://openoffice.org/2000/help">
  14.   <p class="Head1"><help:paragraphinfo state="U" number="1"/><help:key-word value="StrComp" tag="kw66473_1"/><help:link Id="66473">StrComp Function [Runtime]</help:link></p>
  15.   <p class="Paragraph"><help:paragraphinfo state="U" number="2"/>Compares two strings and returns an integer value that represents the result of the comparison.</p>
  16.   <help:paragraphinfo state="E"/></help:to-be-embedded>
  17.   <p class="Head2"><help:paragraphinfo state="U" number="3" xmlns:help="http://openoffice.org/2000/help"/>Syntax:</p>
  18.   <p class="Paragraph"><help:paragraphinfo state="U" number="4" xmlns:help="http://openoffice.org/2000/help"/>StrComp (Text1 As String, Text2 As String[, Compare])</p>
  19.   <p class="Head2"><help:paragraphinfo state="U" number="5" xmlns:help="http://openoffice.org/2000/help"/>Return value:</p>
  20.   <p class="Paragraph"><help:paragraphinfo state="U" number="6" xmlns:help="http://openoffice.org/2000/help"/>Integer</p>
  21.   <p class="Head2"><help:paragraphinfo state="U" number="7" xmlns:help="http://openoffice.org/2000/help"/>Parameter:</p>
  22.   <p class="Paragraph"><help:paragraphinfo state="U" number="8" xmlns:help="http://openoffice.org/2000/help"/><span class="T1">Text1:</span> Any string expression</p>
  23.   <p class="Paragraph"><help:paragraphinfo state="U" number="9" xmlns:help="http://openoffice.org/2000/help"/><span class="T1">Text2:</span> Any string expression</p>
  24.   <p class="Paragraph"><help:paragraphinfo state="U" number="10" xmlns:help="http://openoffice.org/2000/help"/><span class="T1">Compare:</span> This optional parameter sets the comparison method. If Compare = 1, the string comparison is case-sensitive. If Compare = 0, no distinction is made between uppercase and lowercase letters.</p>
  25.   <p class="Head3"><help:paragraphinfo state="U" number="13" xmlns:help="http://openoffice.org/2000/help"/>Return value</p>
  26.   <ul class="L1">
  27.    <li class="">
  28.     <p class="P2"><help:paragraphinfo state="U" number="27" xmlns:help="http://openoffice.org/2000/help"/>If Text1 < Text2 the function returns -1</p>
  29.    </li>
  30.    <li class="">
  31.     <p class="P2"><help:paragraphinfo state="U" number="28" xmlns:help="http://openoffice.org/2000/help"/>If Text1 = Text2 the function returns 0</p>
  32.    </li>
  33.    <li class="">
  34.     <p class="P2"><help:paragraphinfo state="U" number="29" xmlns:help="http://openoffice.org/2000/help"/>If Text1 > Text2 the function returns 1</p>
  35.    </li>
  36.   </ul>
  37.   <p class="Paragraph"><help:paragraphinfo state="S" xmlns:help="http://openoffice.org/2000/help"/><help:embedded Id="66475" Eid="errorcode" xmlns:help="http://openoffice.org/2000/help"/></p>
  38.   <p class="Paragraph"><help:paragraphinfo state="S" xmlns:help="http://openoffice.org/2000/help"/><help:embedded Id="66475" Eid="err5" xmlns:help="http://openoffice.org/2000/help"/></p>
  39.   <p class="Head2"><help:paragraphinfo state="U" number="18" xmlns:help="http://openoffice.org/2000/help"/>Example:</p>
  40.   <p class="PropText"><help:paragraphinfo state="U" number="19" xmlns:help="http://openoffice.org/2000/help"/>Sub ExampleStrComp</p>
  41.   <p class="PropText"><help:paragraphinfo state="U" number="20" xmlns:help="http://openoffice.org/2000/help"/>Dim iVar As Single</p>
  42.   <p class="PropText"><help:paragraphinfo state="U" number="21" xmlns:help="http://openoffice.org/2000/help"/>Dim sVar As String</p>
  43.   <p class="PropText"><help:paragraphinfo state="U" number="22" xmlns:help="http://openoffice.org/2000/help"/>iVar = 123.123</p>
  44.   <p class="PropText"><help:paragraphinfo state="U" number="23" xmlns:help="http://openoffice.org/2000/help"/>sVar = Str$(iVar)</p>
  45.   <p class="PropText"><help:paragraphinfo state="U" number="24" xmlns:help="http://openoffice.org/2000/help"/>Msgbox strcomp(sVar , Str$(iVar),1)</p>
  46.   <p class="PropText"><help:paragraphinfo state="U" number="25" xmlns:help="http://openoffice.org/2000/help"/>end sub</p>
  47.  </body></html>